#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
using namespace std;
#include <algorithm>


void mysort1(int* arr, int n)
{
	int i = n;
	for (int i = 1; i < n; i++)
	{
		int s = arr[i];
		int j = i;
		while (j > 0)
		{
			if (arr[j - 1] > s)
			{
				arr[j] = arr[j-1];
				j--;
			}
			else
			{
				break;
			}
		}
		arr[j] = s;

	}
	
}


void mysort2(int* arr, int n)
{
	int gap = n;
	while (gap/=2)
	{
		for (int i = 0; i < n; i++)
		{
			int end = i-gap;
			int key = arr[i];
			
			while(end>=0)
			{
				if (arr[end] > key)
				{
					arr[end + gap] = arr[end];
					end-=gap;
				}
				else
				{
					break;
				}
			}
			arr[end + gap] = key;
		}
	}
}

void mysort3(int* arr, int n)
{
	for (int i = 0; i < n-1; i++)
	{
		for (int j = 0; j < n-1-i; j++)
		{
			if (arr[j] > arr[j + 1])
			{
				swap(arr[j], arr[j + 1]);
			}
		}
	}
}

int quicksort(int* arr, int left, int right)
{
	if (left <= right)return left;

	int key1 = (left + right) / 2;
	int key = arr[key1];
	int i = left;
	int j = right;
	while (i < j)
	{
		while (i<j && arr[i] <= key)
		{
			i++;
		}
		while (i<j && arr[j] >= key)
		{
			j--;
		}
		swap(arr[i], arr[j]);
	}
	swap(arr[i], arr[key1]);
	return i;
}

void mysort(int* arr, int left,int right)
{
	int key = quicksort(arr, left, right);

	mysort(arr, left, key - 1);
	mysort(arr, key + 1, right);
}

//int main()
//{
//	int arr[] = { 10,3,6,2,7,8,9,1,4,5};
//	int n = sizeof(arr) / 4;
//	//mysort(arr, n);
//	mysort(arr, 0,n-1);
//
//	for (int i = 0; i < n; i++)
//	{
//		cout << " " << arr[i];
//	}
//	return 0;
//}


int main()
{
	short i = -1;
	unsigned int k = i;
	cout << k << endl;
	return 0;
}
